---
layout: "default"
title: "Operator: <"
description: "Swift documentation for the '<' operator."
root: "/v1.2"
---

<code class="language-swift">infix operator &lt; {
    associativity none
    precedence 130
}</code>

<h3>Declarations</h3>

<div class="declaration" id="func-lt_-bit-rhs_-bit">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-bit-rhs_-bit">func &lt;(<wbr>_:<wbr> Bit, rhs: Bit)</a>
        
<div class="comment collapse" id="comment-func-lt_-bit-rhs_-bit"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Bit, rhs: Bit) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-character-rhs_-character">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-character-rhs_-character">func &lt;(<wbr>_:<wbr> Character, rhs: Character)</a>
        
<div class="comment collapse" id="comment-func-lt_-character-rhs_-character"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Character, rhs: Character) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-double-rhs_-double">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-double-rhs_-double">func &lt;(<wbr>_:<wbr> Double, rhs: Double)</a>
        
<div class="comment collapse" id="comment-func-lt_-double-rhs_-double"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Double, rhs: Double) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-float-rhs_-float">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-float-rhs_-float">func &lt;(<wbr>_:<wbr> Float, rhs: Float)</a>
        
<div class="comment collapse" id="comment-func-lt_-float-rhs_-float"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Float, rhs: Float) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-float80-rhs_-float80">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-float80-rhs_-float80">func &lt;(<wbr>_:<wbr> Float80, rhs: Float80)</a>
        
<div class="comment collapse" id="comment-func-lt_-float80-rhs_-float80"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Float80, rhs: Float80) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-int-rhs_-int">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-int-rhs_-int">func &lt;(<wbr>_:<wbr> Int, rhs: Int)</a>
        
<div class="comment collapse" id="comment-func-lt_-int-rhs_-int"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Int, rhs: Int) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-int8-rhs_-int8">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-int8-rhs_-int8">func &lt;(<wbr>_:<wbr> Int8, rhs: Int8)</a>
        
<div class="comment collapse" id="comment-func-lt_-int8-rhs_-int8"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Int8, rhs: Int8) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-int16-rhs_-int16">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-int16-rhs_-int16">func &lt;(<wbr>_:<wbr> Int16, rhs: Int16)</a>
        
<div class="comment collapse" id="comment-func-lt_-int16-rhs_-int16"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Int16, rhs: Int16) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-int32-rhs_-int32">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-int32-rhs_-int32">func &lt;(<wbr>_:<wbr> Int32, rhs: Int32)</a>
        
<div class="comment collapse" id="comment-func-lt_-int32-rhs_-int32"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Int32, rhs: Int32) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-int64-rhs_-int64">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-int64-rhs_-int64">func &lt;(<wbr>_:<wbr> Int64, rhs: Int64)</a>
        
<div class="comment collapse" id="comment-func-lt_-int64-rhs_-int64"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: Int64, rhs: Int64) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-objectidentifier-rhs_-objectidentifier">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-objectidentifier-rhs_-objectidentifier">func &lt;(<wbr>_:<wbr> ObjectIdentifier, rhs: ObjectIdentifier)</a>
        
<div class="comment collapse" id="comment-func-lt_-objectidentifier-rhs_-objectidentifier"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: ObjectIdentifier, rhs: ObjectIdentifier) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-string-rhs_-string">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-string-rhs_-string">func &lt;(<wbr>_:<wbr> String, rhs: String)</a>
        
<div class="comment collapse" id="comment-func-lt_-string-rhs_-string"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: String, rhs: String) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-string-index-rhs_-string-index">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-string-index-rhs_-string-index">func &lt;(<wbr>_:<wbr> String.Index, rhs: String.Index)</a>
        
<div class="comment collapse" id="comment-func-lt_-string-index-rhs_-string-index"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: String.Index, rhs: String.Index) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-string-utf16view-index-rhs_-string-utf16view-index">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-string-utf16view-index-rhs_-string-utf16view-index">func &lt;(<wbr>_:<wbr> String.UTF16View.Index, rhs: String.UTF16View.Index)</a>
        
<div class="comment collapse" id="comment-func-lt_-string-utf16view-index-rhs_-string-utf16view-index"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: String.UTF16View.Index, rhs: String.UTF16View.Index) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-string-unicodescalarview-index-rhs_-string-unicodescalarview-index">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-string-unicodescalarview-index-rhs_-string-unicodescalarview-index">func &lt;(<wbr>_:<wbr> String.UnicodeScalarView.Index, rhs: String.UnicodeScalarView.Index)</a>
        
<div class="comment collapse" id="comment-func-lt_-string-unicodescalarview-index-rhs_-string-unicodescalarview-index"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: String.UnicodeScalarView.Index, rhs: String.UnicodeScalarView.Index) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-uint-rhs_-uint">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-uint-rhs_-uint">func &lt;(<wbr>_:<wbr> UInt, rhs: UInt)</a>
        
<div class="comment collapse" id="comment-func-lt_-uint-rhs_-uint"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: UInt, rhs: UInt) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-uint8-rhs_-uint8">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-uint8-rhs_-uint8">func &lt;(<wbr>_:<wbr> UInt8, rhs: UInt8)</a>
        
<div class="comment collapse" id="comment-func-lt_-uint8-rhs_-uint8"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: UInt8, rhs: UInt8) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-uint16-rhs_-uint16">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-uint16-rhs_-uint16">func &lt;(<wbr>_:<wbr> UInt16, rhs: UInt16)</a>
        
<div class="comment collapse" id="comment-func-lt_-uint16-rhs_-uint16"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: UInt16, rhs: UInt16) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-uint32-rhs_-uint32">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-uint32-rhs_-uint32">func &lt;(<wbr>_:<wbr> UInt32, rhs: UInt32)</a>
        
<div class="comment collapse" id="comment-func-lt_-uint32-rhs_-uint32"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: UInt32, rhs: UInt32) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-uint64-rhs_-uint64">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-uint64-rhs_-uint64">func &lt;(<wbr>_:<wbr> UInt64, rhs: UInt64)</a>
        
<div class="comment collapse" id="comment-func-lt_-uint64-rhs_-uint64"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: UInt64, rhs: UInt64) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt_-unicodescalar-rhs_-unicodescalar">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt_-unicodescalar-rhs_-unicodescalar">func &lt;(<wbr>_:<wbr> UnicodeScalar, rhs: UnicodeScalar)</a>
        
<div class="comment collapse" id="comment-func-lt_-unicodescalar-rhs_-unicodescalar"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;(lhs: UnicodeScalar, rhs: UnicodeScalar) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt-key_-hashable-value_-dictionaryindex-key-value-rhs_-dictionaryindex-key-value">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt-key_-hashable-value_-dictionaryindex-key-value-rhs_-dictionaryindex-key-value">func <wbr>&lt; &lt;Key : Hashable, Value&gt;(<wbr>_:<wbr> DictionaryIndex&lt;Key, Value&gt;, rhs: DictionaryIndex&lt;Key, Value&gt;)</a>
        
<div class="comment collapse" id="comment-func-lt-key_-hashable-value_-dictionaryindex-key-value-rhs_-dictionaryindex-key-value"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;&lt;Key : Hashable, Value&gt;(lhs: DictionaryIndex&lt;Key, Value&gt;, rhs: DictionaryIndex&lt;Key, Value&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt-t_-comparable_-t-rhs_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt-t_-comparable_-t-rhs_-t">func <wbr>&lt; &lt;T : _Comparable&gt;(<wbr>_:<wbr> T?, rhs: T?)</a>
        
<div class="comment collapse" id="comment-func-lt-t_-comparable_-t-rhs_-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;&lt;T : _Comparable&gt;(lhs: T?, rhs: T?) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt-t_-strideable_-t-y_-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt-t_-strideable_-t-y_-t">func <wbr>&lt; &lt;T : _Strideable&gt;(<wbr>_:<wbr> T, y: T)</a>
        
<div class="comment collapse" id="comment-func-lt-t_-strideable_-t-y_-t"><div class="p">
    <p>Compare two Strideables</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;&lt;T : _Strideable&gt;(x: T, y: T) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt-t_-hashable_-setindex-t-rhs_-setindex-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt-t_-hashable_-setindex-t-rhs_-setindex-t">func <wbr>&lt; &lt;T : Hashable&gt;(<wbr>_:<wbr> SetIndex&lt;T&gt;, rhs: SetIndex&lt;T&gt;)</a>
        
<div class="comment collapse" id="comment-func-lt-t_-hashable_-setindex-t-rhs_-setindex-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;&lt;T : Hashable&gt;(lhs: SetIndex&lt;T&gt;, rhs: SetIndex&lt;T&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt-t_-unsafemutablepointer-t-rhs_-unsafemutablepointer-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt-t_-unsafemutablepointer-t-rhs_-unsafemutablepointer-t">func &lt; &lt;T&gt;(<wbr>_:<wbr> UnsafeMutablePointer&lt;T&gt;, rhs: UnsafeMutablePointer&lt;T&gt;)</a>
        
<div class="comment collapse" id="comment-func-lt-t_-unsafemutablepointer-t-rhs_-unsafemutablepointer-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;&lt;T&gt;(lhs: UnsafeMutablePointer&lt;T&gt;, rhs: UnsafeMutablePointer&lt;T&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-lt-t_-unsafepointer-t-rhs_-unsafepointer-t">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-lt-t_-unsafepointer-t-rhs_-unsafepointer-t">func &lt; &lt;T&gt;(<wbr>_:<wbr> UnsafePointer&lt;T&gt;, rhs: UnsafePointer&lt;T&gt;)</a>
        
<div class="comment collapse" id="comment-func-lt-t_-unsafepointer-t-rhs_-unsafepointer-t"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">func &lt;&lt;T&gt;(lhs: UnsafePointer&lt;T&gt;, rhs: UnsafePointer&lt;T&gt;) -&gt; Bool</code>
    
    
</div></div>
</div>
